package com.neuqsoft.rd.citizen.thirdapp.demo.service;

import com.google.gson.JsonObject;
import com.neuqsoft.rd.citizen.thirdapp.demo.DemoConstant;
import com.neuqsoft.rd.citizen.thirdapp.demo.dto.OnlineWhoDTO;
import com.neuqsoft.rd.citizen.thirdapp.demo.dto.SweptUserDTO;
import com.neuqsoft.rd.citizen.thirdapp.sdk.UserService;
import com.neuqsoft.rd.citizen.thirdapp.sdk.dto.PersonInfoDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;

/**
 * @author baidh
 * @date 2020/12/03
 */
@Service
public class Scene6Service {

    @Autowired
    UserService userService;

    public OnlineWhoDTO scanCode(String authCode) {
        final PersonInfoDTO personInfoDTO = userService.beSwept(authCode);

        OnlineWhoDTO dto = new OnlineWhoDTO();
        dto.setIdcard(personInfoDTO.getIdcard());
        dto.setName(personInfoDTO.getName());
        return dto;
    }
}
